Skip to content

fix(locale): use valid province prefixes in tr postcodes - #4267

Open
kevin9327 wants to merge 1 commit into
faker-js:nextfrom
kevin9327:fix-tr-postcode-prefix
Open

kevin9327 wants to merge 1 commit into
faker-js:nextfrom
kevin9327:fix-tr-postcode-prefix

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

Turkish postal codes start with the two-digit license plate code of the province, from 01 (Adana) to 81 (Düzce), followed by three digits (e.g. 06420 Ankara, 34000 Istanbul, 81000 Düzce). The tr locale uses the single pattern #####, so about one in five fakerTR.location.zipCode() results starts with 00 or 82–99. No Turkish postcode uses those prefixes.

This builds the patterns 01### … 81### the same way as the fr department prefixes (#3905) and the es change in #4255.

Testing:

  • Loaded the new definitions with Node 22: 81 patterns, 01### through 81###, no duplicates.
  • Data-only change; no other locale imports tr/location/postcode.ts.

Source: https://en.wikipedia.org/wiki/Postal_codes_in_Turkey

Prepared with AI assistance.

@kevin9327
kevin9327 requested a review from a team as a code owner November 11, 2026 01:04
@netlify

netlify Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 0a93d29
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6af3bf0f0f1896db93ee73f1
😎 Deploy Preview https://deploy-preview-4267.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.14%. Comparing base (5415aec) to head (0a93d29).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #4267   +/-   ##
=======================================
  Coverage   99.14%   99.14%           
=======================================
  Files        1179     1180    +1     
  Lines        3976     3978    +2     
  Branches      723      709   -14     
=======================================
+ Hits         3942     3944    +2     
  Misses         29       29           
  Partials        5        5           
Files with missing lines Coverage Δ
src/locales/tr/location/postcode.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: locale Permutes locale definitions m: location Something is referring to the location module labels Nov 11, 2026
@ST-DDT ST-DDT added this to the v11.0 milestone Nov 11, 2026
@ST-DDT
ST-DDT enabled auto-merge November 12, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: locale Permutes locale definitions m: location Something is referring to the location module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants